import 'package:flutter/material.dart';
import 'package:yuque/app_theme.dart';

class ActionCard extends StatelessWidget {
  const ActionCard({Key? key, required this.child, this.actions}) : super(key: key);

  final Widget child;
  final Widget? actions;

  @override
  Widget build(BuildContext context) {
    return Container(
      padding: EdgeInsets.all(15),
      decoration: BoxDecoration(
        color: AppTheme.white,
        borderRadius: BorderRadius.circular(8),
        boxShadow: [
          BoxShadow(
            color: AppTheme.lightGrey.withOpacity(0.2),
            blurRadius: 12,
            offset: Offset(4, 4),
          )
        ],
      ),
      child: Column(
        children: [
          child,
          if (actions != null) actions!,
        ],
      ),
    );
  }
}
